package wli.java.xml;

import static org.junit.Assert.*;

import java.util.List;

import org.junit.Test;

public class StagsXmlParserTest {

	@Test
	public void testReadConfig() {
		StagsXmlParser read = new StagsXmlParser();
		List<Stage> readConfig = read.readConfig("C:\\VMS6X.xml");
		int count_nr = 0; int count_cat1 =0; int count_cat2=0; int count_cat3 =0;
		for (Stage stage : readConfig) {
			//System.out.println(stage);
			if(stage.getFindingStatus().equals("NR")) {
				count_nr++;
				if(stage.getGdSeverity().equals("1")) count_cat1++;
				if(stage.getGdSeverity().equals("2")) count_cat2++;
				if(stage.getGdSeverity().equals("3")) count_cat3++;
			}
			
			System.out.print(stage.getAssetId()+"	|	"+stage.getFindingId()+"	|	"+stage.getFindingStatus()+"	|	"+stage.getTargetDescrip()+"	|	"+stage.getGdSeverity()+"\n");
		}
		System.out.println("total nr="+count_nr);
		System.out.println("total nr cat1="+count_cat1);
		System.out.println("total nr cat2="+count_cat2);
		System.out.println("total nr cat3="+count_cat3);
	}

}
